package com.mall.search.web.config;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

/**
 * @author Administrator
 */
@Configuration
public class SpirngMvcConfig {

    /**
     * 配置dispatcherServlet的默认设置
     */

    @Bean
    public ServletRegistrationBean MySetting(DispatcherServlet dispatcherServlet) {
        ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
        //设置伪造静态页面
        registration.getUrlMappings().clear();
        registration.getUrlMappings().add("*.html");
        return registration;
    }

}
